﻿using System;

class SortThreeValues
    {
        static void Main()
        {
            //Sort 3 real values in descending order using nested if statements.

            Console.WriteLine("Enter three numbers.");
            Console.Write("Enter first number: ");
            int firstNumber = int.Parse(Console.ReadLine());
            Console.Write("Enter second number: ");
            int secondNumber = int.Parse(Console.ReadLine());
            Console.Write("Enter third number: ");
            int thirdNumber = int.Parse(Console.ReadLine());

            if (firstNumber < secondNumber)
            {
                if (secondNumber < thirdNumber)
                {
                    Console.WriteLine("The three numbers in descending order: {0}, {1}, {2}", thirdNumber, secondNumber, firstNumber);
                }
                else
                {
                    if (firstNumber < thirdNumber)
                    {
                        Console.WriteLine("The three numbers in descending order: {0}, {1}, {2}", secondNumber, thirdNumber, firstNumber);
                    }
                    else
                    {
                        Console.WriteLine("The three numbers in descending order: {0}, {1}, {2}", secondNumber, firstNumber, thirdNumber);
                    }
                }
            }
            if (firstNumber > secondNumber)
            {
                if (secondNumber > thirdNumber)
                {
                    Console.WriteLine("The three numbers in descending order: {0}, {1}, {2}", firstNumber, secondNumber, thirdNumber);
                }
                else
                {
                    if (firstNumber < thirdNumber)
                    {
                        Console.WriteLine("The three numbers in descending order: {0}, {1}, {2}", thirdNumber, firstNumber, secondNumber);
                    }
                    else
                    {
                        Console.WriteLine("The three numbers in descending order: {0}, {1}, {2}", firstNumber, thirdNumber, secondNumber);
                    }
                }
            }
             
        }
    }

